
const fs = require('fs'),
    glob = require("glob");

let react = glob.sync("2.*.chunk.js.map"),
    main = glob.sync("main.*.chunk.js.map");
let content = "";
if (react && react.length > 0) {
    content = content + "call reverse-sourcemap -o ..\\..\\result\\react -v " + react[0] + "\r\n";
} else
    console.log("warning: react.map not found");
if (main && main.length > 0) {
    content = content + "call reverse-sourcemap -o ..\\..\\result\\main -v " + main[0] + "\r\n";
} else
    console.log("warning: main.map not found");
fs.writeFileSync("genmap.cmd", content);
